aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/verify/[code]/+page.server.ts
blob: a7edede6fece091e75f70b2a4547e6afd3155cd4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { get } from "$lib/utils";
import { redirect } from "@sveltejs/kit";

export const load = async ({ params: { code } }) => {
	let user;
	try {
		user = await get(`/verify/${code}`);
	} catch (e) {
		console.log(e);
		return { error: "Verification failed" };
	}

	redirect(307, "/settings/account?verified=true");
};
;: "^0.0.6", "@noble/hashes": "^2.0.1", "@scure/base": "^2.0.0", "@scure/bip32": "^2.0.1", "@scure/btc-signer": "^2.0.1", "@simplewebauthn/server": "^13.2.3", "bech32": "^2.0.0", "clightning-client": "github:asoltys/lightning-client-js#master", "eventsource": "^4.1.0", "file-type": "^21.3.0", "fluent-ffmpeg": "^2.1.3", "got": "^14.6.6", "handlebars": "^4.7.8", "hono": "^4.7.0", "jsonwebtoken": "^9.0.3", "lnurl": "^0.27.0", "mqtt": "^5.15.0", "nostr": "^0.2.8", "nostr-tools": "^2.23.3", "otplib": "^12.0.1", "pino": "^10.3.1", "pino-pretty": "^13.1.3", "pump": "^3.0.3", "ramda": "^0.32.0", "redis": "^5.11.0", "sharp": "0.33.5", "square": "^43.2.1", "strfry-rpc": "^0.0.1", "tigerbeetle-node": "0.16.74", "uuid": "^13.0.0", "web-push": "^3.6.7", "ws": "^8.19.0" }, "devDependencies": { "@types/bun": "^1.3.9", "nodemon": "^3.1.14", "oxfmt": "^0.35.0", "oxlint": "^1.50.0", "typescript": "^5.9.3" }, "overrides": { "axios": ">=1.13.5", "body-parser": ">=1.20.3", "minimatch": ">=3.1.3", "path-to-regexp": ">=0.1.10", "qs": ">=6.14.1", "semver": ">=7.5.2" }, "apidoc": { "title": "CoinOS Server API Documentation", "url": "https://coinos.io/api" } }